Motion vector detecting apparatus

ABSTRACT

A first block size motion searching device ( 4 ) detects a motion vector with respect to each of blocks by a unit of variable blocks in the smallest first block size. A feature value extracting device ( 6 ) detects a feature value between the adjacent blocks. A motion search determining device ( 7 ) determines by utilizing the feature value whether or not the motion search should be executed in the second to nth block sizes. A search center generating device ( 8 ), a search area generating device ( 9 ) and a selected block size motion searching device ( 10 ) selects the second to nth block sizes and detects the motion vector. A block size determining device ( 11 ) determines the block size having a high efficiency.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a motion vector detecting apparatus forexecuting motion searches on the basis of variable block sizes so as todetect a motion vector, and more particularly to a motion vectordetecting apparatus for detecting a motion vector which is used forpredicting a motion compensation in a high efficiency coding of adigital motion picture signal.

2. Description of the Related Art

In the high efficiency coding system for coding the sequentially inputmotion picture signals by a less coding amount, there is a motioncompensation prediction coding system as a coding system utilizing acorrelation between the picture signals. In the motion compensationprediction coding, it is possible to widely reduce a coding amount bydetecting a block having a highest correlation within a referencepicture in the input picture, and coding a motion vector expressing themotion and a prediction error between the input picture and thereference picture.

It is possible to further reduce the prediction error by using variableblock sizes as an area unit for executing the detection of the motionvector and the motion compensation, and it is possible to further reducethe coding amount. For example, in H.264 corresponding to aninternational standard of the picture coding, the coding is executed byconstituting the area unit for executing the motion compensation by fourkinds of block sizes comprising 8×8 pixels, 8×16 pixels, 16×8 pixels and16×16 pixels as shown in FIGS. 1A, 1B, 1C and 1D, and selecting theblock size having a higher coding efficiency among them. Further, in thecase that the block size of 8×8 pixels is selected, it is possible tofurther separate each of the blocks into 4×4 pixels, 4×8 pixels and 8×4pixels.

A simplest structure of the motion vector detecting apparatus fordetecting the motion vector by setting variable block sizes as a unit isa system (hereinafter, refer to as a first system) of determining amotion vector which minimizes the prediction error in all the blocksizes, and selecting the block size in which the prediction error is theminimum.

Further, in the following patent document 1, there is proposed a system(hereinafter, refer to as a second system) of reducing the block size tobe selected in a process of the motion search, by comparing theprediction error per the block sizes in the middle of the motion searchand passing over the large block size at a time when a predeterminedcondition is satisfied so as to execute the motion search.

[Patent document 1] Japanese Unexamined Patent Publication No.2003-111082

In the first system mentioned above, since the motion search is executedwith respect to all the block sizes, there is a problem that acalculation amount becomes huge, and a processing speed is lowered.

Further, in the second system mentioned above, since the block size tobe selected is excluded in the middle of the motion searching process, ahigher processing speed can be expected in comparison with the firstsystem, however, since the motion searches of variable block sizes areexecuted in parallel until the partway stage, there is a problem that alot of calculation amount is required.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a vector detectingapparatus which can solve the problem mentioned above, can widely reducea calculation amount without lowering a search accuracy very much, andcan detect a motion vector by executing motion searches on the basis ofvariable block sizes at a high efficiency.

In order to accomplish the object, a feature of the present inventionresides in that a motion vector detecting apparatus for detecting amotion vector between sequentially input picture signals by a unit ofthe first to nth variable block sizes (n is an integral number equal toor more than 2), comprises a first motion vector detecting means fordetecting a motion vector with respect to each of the blocks by a unitof variable blocks in the smallest first block size, a feature valuedetecting means for detecting a feature value between the adjacentblocks on the basis of the motion vectors detected by the first motionvector detecting means, and a second motion vector detecting means forselecting the second to nth block sizes on the basis of the featurevalue detected by the feature value detecting means and detecting themotion vector with respect to the blocks in the second to nth blocksizes.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the feature value detecting meansdetects a vector distance between the motion vectors detected by thefirst motion vector detecting means or a dispersion thereof as thefeature value, and the second motion vector detecting means determinesby utilizing the vector distance between the motion vectors or thedispersion, which unit of the second to nth block sizes a motion searchshould be executed by.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the second motion vector detectingmeans determines a search center on the basis of the feature valuedetected by the feature value detecting means, and detects the motionvector with respect to the blocks in the second to nth block sizes.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the feature value detecting meansdetects a center vector of the motion vectors detected by the firstmotion vector detecting means as the feature value, and the secondmotion vector detecting means determines the search center by utilizingthe center vector.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the second motion vector detectingmeans determines a search area on the basis of the feature valuedetected by the feature value detecting means, and detects the motionvector with respect to the blocks in the second to nth block sizes.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the feature value detecting meansdetects the vector distance between the motion vectors or the dispersionof the motion vector detected by the first motion vector detecting meansas the feature value, and the second motion vector detecting meansdetermines the search area by utilizing the vector distance between themotion vectors or the dispersion of the motion vectors.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the variable block sizes areconstituted by a first block size, a second block size having a doubleheight of the first block size, a third block size having a double widthof the first block size, and a fourth block size having a double widthand a double height of the first block size, the feature value detectingmeans detects the vector distance between the motion vectors detected bythe first motion vector detecting means, and the second motion vectordetecting means selects the third block size and detects the motionvector in the case that the vector distance between the motion vectorswith respect to the blocks in the first block size adjacent in ahorizontal direction is small.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the variable block sizes areconstituted by a first block size, a second block size having a doubleheight of the first block size, a third block size having a double widthof the first block size, and a fourth block size having a double widthand a double height of the first block size, the feature value detectingmeans detects the vector distance between the motion vectors detected bythe first motion vector detecting means, and the second motion vectordetecting means selects the second block size and detects the motionvector in the case that the vector distance between the motion vectorswith respect to the blocks in the first block size adjacent in avertical direction is small.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the variable block sizes areconstituted by a first block size, a second block size having a doubleheight of the first block size, a third block size having a double widthof the first block size, and a fourth block size having a double widthand a double height of the first block size, the feature value detectingmeans detects the vector distance between the motion vectors detected bythe first motion vector detecting means, and the second motion vectordetecting means selects the fourth block size and detects the motionvector in the case that the vector distance between the motion vectorswith respect to all the blocks in the first block size is small.

Also, another feature of the present invention resides in that a motionvector detecting apparatus, wherein the variable block sizes areconstituted by a first block size, a second block size having a doubleheight of the first block size, a third block size having a double widthof the first block size, and a fourth block size having a double widthand a double height of the first block size, the feature value detectingmeans detects the vector distance between the motion vectors detected bythe first motion vector detecting means or the dispersion, and thesecond motion vector detecting means selects at least one of the secondto fourth block sizes in accordance with the vector distance between themotion vectors with respect to the blocks in the first block size or thedispersion and detects the motion vector.

In the present invention, since it is determined at a time when themotion search with respect to the first block size is finished, whetheror not the motion search with respect to the other block sizes isexecuted, and the search center and the search area of the motion searchare determined by using the feature value detected on the basis of themotion vectors about the first block size, it is possible to widelyreduce the processing step number required for the motion search in theother block sizes than the first block size.

Further, since the search center and the search area are determined byusing the feature value detected on the basis of the motion vectorsabout the first block size and predicting the motion vector close to themotion vectors about the other block sizes, it is possible to execute ahigh accuracy motion search while reducing the processing step number ofthe motion search.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A, 1B, 1C and 1D are schematic views of variable block sizes;

FIG. 2 is a block diagram showing a structure of one embodiment inaccordance with the present invention;

FIG. 3 is a schematic view of a center vector and a distance between thevectors; and

FIG. 4 is a flow chart showing a motion of one embodiment in accordancewith the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A description will be given below of the present invention withreference to the accompanying drawings. FIG. 2 is a block diagramshowing a structure of one embodiment in accordance with the presentinvention. In this case, the following description will be given of anexample in which a motion detection is executed on the basis of fourblock sizes comprising a first block size (FIG. 1A), a second block size(FIG. 1B), a third block size (FIG. 1C) and a fourth block size (FIG.1D) shown in FIGS. 1A, 1B, 1C and 1D.

In FIG. 2, an input picture (a motion picture) signal 1 is stored in aninput picture storage memory 3, and a reference picture signal 2 isstored in a reference picture storage memory 12.

A first block size motion searching device 4 executes a motion search bya unit of the first block size between the input picture signal 1 andthe reference picture signal 2 which are stored in the input picturestorage memory 3 and the reference picture storage memory 12, anddetects motion vectors with respect to 8×8 pixel blocks (a-1), (a-2),(a-3) and (a-4). In this case, prediction errors are also derived fromthe first block size motion searching device 4 in the process of themotion searching, and the prediction errors are applied to a block sizedetermining device 11 mentioned below together with the motion vectors.

A block size selecting device 5 delivers a signal for sequentiallyselecting the second, third and fourth block sizes, and indicates theblock size to be processed to a feature value extracting device 6.

The feature value extracting device 6 extracts the feature value on thebasis of the motion vectors with respect to the 8×8 pixel blocks (a-1),(a-2), (a-3) and (a-4) detected by the first block size motion searchingdevice 4, and the block size given by the block size selecting device 5.The feature value is, for example, a center vector of the motion vector,a distance between the vectors, a dispersion or the like. FIG. 3 shows acenter vector of two vectors MVa and MVb and a distance between thevectors. Further, the dispersion means a value expressing a scatteringstate of a plurality of vectors.

A motion search determining device 7 determines on the basis of thefeature value extracted by the feature extracting device 6 whether ornot the motion search should be executed by a selected block size motionsearching device 10 by a unit of the block size indicated by the blocksize selecting device 5. A reference for the determination can employ,for example, the distance between the vectors as mentioned below.

In the case that the block size selecting device 5 indicates the secondblock size, it is determined whether or not the motion search should beexecuted, on the basis of the matter that any one of the vector distancebetween the motion vectors with respect to the blocks (a-1) and (a-3),and the vector distance between the motion vectors with respect to theblocks (a-2) and (a-4) is lower than a fixed threshold value. Forexample, when the vector distance between the motion vectors is lowerthan the fixed threshold value, it is determined that the motion searchshould be executed on the basis of the second block size.

In the case that the block size selecting device 5 indicates the thirdblock size, it is determined whether or not the motion search should beexecuted, on the basis of the matter that any one of the vector distancebetween the motion vectors with respect to the blocks (a-1) and (a-2),and the vector distance between the motion vectors with respect to theblocks (a-3) and (a-4) is lower than the fixed threshold value. Forexample, when the vector distance between the motion vectors is lowerthan the fixed threshold value, it is determined that the motion searchshould be executed on the basis of the third block size.

In the case that the block size selecting device 5 indicates the fourthblock size, it is determined whether or not the motion search should beexecuted, on the basis of the matter that all of the vector distancebetween the motion vectors with respect to the blocks (a-1), (a-2),(a-3) and (a-4) is lower than the fixed threshold value. For example,when all of the vector distance between the motion vectors is lower thanthe fixed threshold value, it is determined that the motion searchshould be executed on the basis of the fourth block size.

The dispersion of the motion vector can be used for the reference ofdetermining whether or not the motion search should be executed by theselected block size motion searching device 10 by a unit of the blocksize indicated by the block size selecting device 5. For example, whenthe dispersion of the motion vector with respect to the blocks (a-1),(a-3), (a-2) and (a-4) is more than the fixed threshold value, it ispossible to execute the motion search on the basis of at least one ofthe second and fourth block sizes, for example, the fourth block size.

When the motion search determining device 7 determines that the searchshould be executed, a search center generating device 8 determines asearch center at a time when the selected block size motion searchingdevice 10 executes the motion search on the basis of the feature valueextracted by the feature extracting device 6, and gives the searchcenter to the reference picture storage memory 12. The search centerindicates a block position in the reference picture which the referencepicture storage memory 12 sends to the selected block size motionsearching device 10. The search center generated by the search centergenerating device 8 can be determined, for example, by the center vectorof the motion vector in the following manner.

In the case that the block size selecting device 5 indicates the secondblock size, the center vector (leading end) of the motion vector withrespect to the blocks (a-1) and (a-3) is set to a search center of ablock (b-1), and the center vector of the motion vector with respect tothe blocks (a-2) and (a-4) is set to a search center of a block (b-2).

In the case that the block size selecting device 5 indicates the thirdblock size, the center vector of the motion vector with respect to theblocks (a-1) and (a-2) is set to a search center of a block (c-1), andthe center vector of the motion vector with respect to the blocks (a-3)and (a-4) is set to a search center of a block (c-2).

In the case that the block size selecting device 5 indicates the fourthblock size, the center vector of the motion vector with respect to theblocks (a-1), (a-2), (a-3) and (a-4) is set to a search center.

When the motion search determining device 7 determines that the searchshould be executed, a search area generating device determines a searcharea at a time when the selected block size motion searching device 10executes the motion search, on the basis of the feature value extractedby the feature extracting device 6, and gives the search area to theselected block size motion searching device 10. The search areagenerated by the search area generating device 9 can be determined, forexample, on the basis of the vector distance between the motion vectorsin accordance with the following manner.

In the case that the block size selecting device 5 indicates the secondblock size, a pixel area in which the distance between the motionvectors with respect to the blocks (a-1) and (a-3) is a radius, is setas the search area of the block (b-1), and a pixel area in which thedistance between the motion vectors with respect to the blocks (a-2) and(a-4) is a radius, is set as the search area of the block (b-2).

In the case that the block size selecting device 5 indicates the thirdblock size, a pixel area in which the vector distance between the motionvectors with respect to the blocks (a-1) and (a-2) is a radius, is setas the search area of the block (c-1), and a pixel area in which thevector distance between the motion vectors with respect to the blocks(a-3) and (a-4) is a radius, is set as the search area of the block(c-2).

In the case that the block size selecting device 5 indicates the fourthblock size, a pixel area in which the maximum value of the vectordistances between the motion vectors with respect to the blocks (a-1),(a-2), (a-3) and (a-4) is a radius, is set as the search area.

The selected block size motion searching device 10 executes the motionsearch between the reference picture in which the center position iscorrected by the search center determined by the search centergenerating device 8, and the input picture, in the search area indicatedby the search area generating device 9. In this case, a prediction erroris also derived from the selected block size motion searching device 10in the process of the motion search, and the prediction error is givento the block size determining device 11 together with the motion vector.

The motion vector and the prediction error which are determined by thefirst block size motion searching device 4, and the motion vector andthe prediction error which are determined by the selected block sizemotion searching device 10 are given to the block size determiningdevice 11.

The block size determining device 11 determines a block size having ahighest coding efficiency on the basis of a coding length of each of theblock size with respect to the motion vector and the prediction error,and delivers the determined block size and the motion vector incorrespondence to the block size mentioned above.

FIG. 4 is a flow chart showing an operation of one embodiment inaccordance with the present invention. First, the motion search in thefirst block size is executed between the input picture and the referencepicture (S01). Accordingly, the motion vectors and the prediction errorwith respect to the block of the first block size are derived.

Next, an initial block size is selected (S02), and the feature valuebetween the adjacent blocks in the block size is extracted (S03). Inthis case, in the embodiment mentioned above, the initial block sizecorresponds to the second block size, and the center vector of themotion vectors with respect to the blocks (b-1) and (b-2), thedispersion, the vector distance and the like are extracted as thefeature value.

Next, it is determined on the basis of the extracted feature valuewhether or not the motion search should be executed by a unit of theinitial block size (S04). The reference for the determination can bedefined in accordance with the feature value such as the vector distancebetween the motion vectors and the dispersion thereof, as mentionedabove.

When it is determined in S04 that the motion search should be executed(Y), the search center and the search area are determined (S05). Thedetermination can be executed on the basis of the feature value such asthe center vector of the motion vector and the vector distance asmentioned above.

Next, the motion search is executed between the input picture and thereference picture in accordance with the search center and the searcharea which are determined in S05. Accordingly, the motion vector and theprediction error with respect to the block of the initial block size canbe derived.

In the case that it is determined in S04 that the motion search shouldnot be executed (N), or in the case that it is determined in S06 thatthe motion search with respect to the initial block is finished, thestep goes to S07, and it is determined whether or not the motion searchwith respect to the blocks in all the block sizes is finished. In thiscase, when it is determined that the motion searches with respect to theblocks in all the block sizes are finished, the block size having thehighest coding efficiency is finally determined on the basis of themotion vectors and the prediction errors which have been derived (S09).

When it is determined in S07 that the motion searches with respect tothe blocks in all the block sizes are not finished, the block size isrenewed to the next block size (S08), and the steps from S03 arerepeated. In the example mentioned above, the steps S03 to S08 arerepeated with respect to the blocks in the third block size and thefourth block size, and when the process with respect to the block in thefourth block size is finished, the step goes to S09.

The description is given above of the example in which the motionpicture coding system is constituted by H.264/MPEG-4 AVC (Advanced VideoCoding), and a search unit is constituted by variable block sizescomprising the first block size (FIG. 1A), the second block size (FIG.1B) having the double height of the first block size, the third blocksize (FIG. 1C) having the double width of the first block size and thefourth block size (FIG. 1D) having the double width and the doubleheight of the first block size, as shown in FIGS. 1A, 1B, 1C and 1D.However, the coding system, the block size and the block number in thepresent invention are not limited to them. The present invention can beapplied to general application and general coding apparatus utilizingthe motion picture.

1. A motion vector detecting apparatus for detecting a motion vector between sequentially input picture signals, a currently input picture signal being divided into blocks prior to encoding, the blocks having variable block size ranging from a first block size to an nth block size (n is an integral number equal to or more than 2) without selectively extracting pixel data from the input picture signals where the first block size is a smallest block size and the blocks having block sizes from the second block size to the nth block size include the block having the first block size, comprising: a first motion vector detecting means for detecting a motion vector for each of the blocks in the currently input picture signal divided into blocks having the first block size; a feature value detecting means for detecting a feature value between adjacent blocks inside the currently input picture on the basis of the motion vectors detected by the first motion vector detecting means, wherein the feature value is a vector distance between the motion vectors detected by the first motion vector detecting means or a dispersion thereof; and a second motion vector detecting means for determining respectively whether or not a motion search should be executed by each unit of the block sizes ranging from the second block size to the nth block size on the basis of the feature value detected by the feature value detecting means, selecting a block size from the second block size to the nth block size according to the result of the determining and detecting a motion vector for each of the blocks in the currently input picture signal having the selected block size.
 2. A motion vector detecting apparatus as claimed in claim 1, wherein the second motion vector detecting means determines a search center on the basis of the feature value detected by the feature value detecting means, and detects the motion vector with respect to the blocks in the second to nth block sizes.
 3. A motion vector detecting apparatus as claimed in claim 1, wherein the feature value detecting means further detects a center vector of the motion vectors detected by the first motion vector detecting means as the feature value, and the second motion vector detecting means determines a search center by utilizing the center vector.
 4. A motion vector detecting apparatus as claimed in claim 1, wherein the second motion vector detecting means determines a search area on the basis of the feature value detected by the feature value detecting means, and detects the motion vector with respect to the blocks in the second to nth block sizes.
 5. A motion vector detecting apparatus as claimed in claim 1, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the feature value detecting means detects the vector distance between the motion vectors detected by the first motion vector detecting means, and the second motion vector detecting means selects the third block size and detects the motion vector in the case that the vector distance between the motion vectors with respect to the blocks in the first block size adjacent in a horizontal direction is small.
 6. A motion vector detecting apparatus as claimed in claim 1, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the feature value detecting means detects the vector distance between the motion vectors detected by the first motion vector detecting means, and the second motion vector detecting means selects the second block size and detects the motion vector in the case that the vector distance between the motion vectors with respect to the blocks in the first block size adjacent in a vertical direction is small.
 7. A motion vector detecting apparatus as claimed in claim 1, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the feature value detecting means detects the vector distance between the motion vectors detected by the first motion vector detecting means, and the second motion vector detecting means selects the fourth block size and detects the motion vector in the case that the vector distance between the motion vectors with respect to all the blocks in the first block size is small.
 8. A motion vector detecting apparatus as claimed in claim 1, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the feature value detecting means detects the vector distance between the motion vectors detected by the first motion vector detecting means or the dispersion, and the second motion vector detecting means selects at least one of the second to fourth block sizes in accordance with the vector distance between the motion vectors with respect to the blocks in the first block size or the dispersion and detects the motion vector.
 9. A motion vector detecting method of detecting a motion vector between sequentially input picture signals, a currently input picture signal being divided into blocks prior to encoding, the blocks having variable block size ranging from a first block size to an nth block size (n is an integral number equal to or more than 2) without selectively extracting pixel data from the input picture signals where the first block size is a smallest block size and the blocks having block sizes from the second block size to the nth block size include the block having the first block size, comprising: detecting motion vectors for each of the respective blocks in the currently input picture signal divided into blocks having the first block size; detecting a feature value between adjacent blocks inside the currently input picture signal on the basis of the motion vectors detected by the step of detecting motion vectors for each of the respective blocks having the first block size, wherein the feature value is a vector distance between the motion vectors detected by the detecting motion vectors for each of the respective blocks having the first block size or a dispersion thereof; determining respectively whether or not a motion search should be executed by each unit of the block sizes ranging from the second block size to the nth block size on the basis of the feature value detected by the step of detecting the feature value; selecting a block size from the second block size to the nth block size according to the result of the determining; and detecting motion vectors for each of the respective blocks in the currently input picture signal having the selected block size.
 10. A motion vector detecting method as claimed in claim 9, wherein the determining includes determining a search center on the basis of the feature value detected by the detecting.
 11. A motion vector detecting method as claimed in claim 10, wherein the detecting a feature value includes detecting a center vector of the motion vectors detected by the detecting motion vectors for each of the respective blocks in the currently input picture signal divided into blocks having the first block size as the feature value, and the determining determines the search center by utilizing the center vector.
 12. A motion vector detecting method as claimed in claim 9, wherein the determining further comprises determining a search area on the basis of the feature value detected by the detecting.
 13. A motion vector detecting method as claimed in claim 9, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the detecting the feature value detects the vector distance between the motion vectors detected by the detecting motion vectors for each of the respective blocks having the first block size, the selecting selects a third block size, and the detecting motion vectors having the selected block size detects the motion vector in the case that the vector distance between the motion vectors with respect to the blocks in the first block size adjacent in a horizontal direction is small.
 14. A motion vector detecting method as claimed in claim 9, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the detecting the feature value detects the vector distance between the motion vectors detected by the detecting motion vectors for each of the respective blocks having the first block size, the selecting selects the second block size, and the detecting motion vectors having the selected block size detects the motion vector in the case that the vector distance between the motion vectors with respect to the blocks having the first block size adjacent in a vertical direction is small.
 15. A motion vector detecting method as claimed in claim 9, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the detecting the feature value detects the vector distance between the motion vectors detected by the detecting motion vectors for each of the respective blocks having the first block size, the selecting selects a fourth block size, and the detecting motion vectors having the selected block size detects the motion vectors in the case that the vector distance between the motion vectors with respect to all the blocks in the first block size is small.
 16. A motion vector detecting method as claimed in claim 9, wherein the variable block sizes are constituted by a first block size, a second block size having a double height of the first block size, a third block size having a double width of the first block size, and a fourth block size having a double width and a double height of the first block size, the detecting the feature value detects the vector distance between the motion vectors detected by the detecting motion vectors for each of the respective blocks having the first block size, the selecting selects at least one of the second block size to a fourth block size in accordance with the vector distance between the motion vectors with respect to the blocks having the first block size. 